package edu.drexel.cs544.group11.client.program;

import edu.drexel.cs544.group11.client.protocol.ClientBSP;

/**
 * A lightweight client launcher to launch the client program that utilizes the
 * client BSP.
 * 
 * CS 544
 * 
 * @author Group 11:
 * @author Jason Setzer
 * @author Tam Thongsima
 * @author Kenny Oyefara
 * @author Chase Miller
 * 
 * @date Spring 2013
 * 
 */
public class StartClient {
    
    /**
     * CLIENT
     * 
     * Launcher method.
     * 
     * @param args
     * @throws Exception
     */
    public static void main(String[] args) throws Exception {
	ClientBSP clientBSP = null;
	if (args.length > 1) {
	    // CLIENT
	    clientBSP = new ClientBSP(args[0], args[1]);
	    new ClientCLI(clientBSP);
	}
	else if (args.length > 0) {
	    // CLIENT
	    clientBSP = new ClientBSP(args[0]);
	    new ClientCLI(clientBSP);
	}
	else {
	    // CLIENT	    
	    System.out.println("Usage - please supply at least one argument: first the path to the keystore and second (optional) the server address.");
	}
    }
}
